package cn.tedu.sgos.user.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * @Author: Miyako
 * @Date: 2024-09-23-9:05
 * @Description:注册dto类
 */
@Data
public class UserSaveParam {
    @Size(min=11,max=11, message = "输入有效位数的手机号")
    @ApiModelProperty(name = "手机号/用户名")
    private String phone;
    @Pattern(regexp = "^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{8,12}$", message = "密码必须包含大小写字母和数字，长度为8-12位")
    @ApiModelProperty(name = "密码")
    private String password;
    @Pattern(regexp = "^\\d{4}$\n",message = "验证码格式错误")
    @ApiModelProperty(name = "手机验证码")
    private String auCode;
    @Size(min=2,max=25, message = "昵称限制在2-25字符内")
    @ApiModelProperty("用户昵称")
    private String nickname;
    @Pattern(regexp = "^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\\\.[a-zA-Z]{2,}$\n",message = "邮箱格式错误")
    @ApiModelProperty("邮箱")
    private String email;
    @ApiModelProperty("真实姓名")
    private String name;
    @Pattern(regexp = "^(\\\\d{15}|\\\\d{17}[0-9Xx])$",message = "身份证号错误")
    @ApiModelProperty("身份证号码")
    private String idCard;
    @ApiModelProperty("身份状态")
    private String status;
}
